home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / misc1 / iv26_w30.zip / SOURCES / GLUE.C < prev    next >
C/C++ Source or Header  |  1980-01-03  |  3KB  |  116 lines

  1. /*
  2.  * Copyright (c) 1987, 1988, 1989 Stanford University
  3.  *
  4.  * Permission to use, copy, modify, distribute, and sell this software and its
  5.  * documentation for any purpose is hereby granted without fee, provided
  6.  * that the above copyright notice appear in all copies and that both that
  7.  * copyright notice and this permission notice appear in supporting
  8.  * documentation, and that the name of Stanford not be used in advertising or
  9.  * publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.  Stanford makes no representations about
  11.  * the suitability of this software for any purpose.  It is provided "as is"
  12.  * without express or implied warranty.
  13.  *
  14.  * STANFORD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
  15.  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
  16.  * IN NO EVENT SHALL STANFORD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
  17.  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  18.  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  19.  * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
  20.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  21.  */
  22.  
  23. /*
  24.  * All that's necessary for glue is to set up the shape and
  25.  * redraw the background.
  26.  */
  27.  
  28. #include <InterViews/glue.h>
  29. #include <InterViews/shape.h>
  30.  
  31. Glue::Glue () {
  32.     Init();
  33. }
  34.  
  35. Glue::Glue (const char* name) {
  36.     SetInstance(name);
  37.     Init();
  38. }
  39.  
  40. Glue::Glue (Painter* bg) : (nil, bg) {
  41.     Init();
  42. }
  43.  
  44. void Glue::Init () {
  45.     SetClassName("Glue");
  46. }
  47.  
  48. void Glue::Redraw (Coord, Coord, Coord, Coord) {
  49.     /*
  50.      * Don't do any drawing--assume that an ancestor will take care of it,
  51.      * probably through Canvas::SetBackground.
  52.      */
  53. }
  54.  
  55. HGlue::HGlue (int nat, int str) {
  56.     Init(nat, nat, str);
  57. }
  58.  
  59. HGlue::HGlue (const char* name, int nat, int str) : (name) {
  60.     Init(nat, nat, str);
  61. }
  62.  
  63. HGlue::HGlue (int nat, int shr, int str) {
  64.     Init(nat, shr, str);
  65. }
  66.  
  67. HGlue::HGlue (const char* name, int nat, int shr, int str) : (name) {
  68.     Init(nat, shr, str);
  69. }
  70.  
  71. HGlue::HGlue (Painter* bg, int nat, int str) : (bg) {
  72.     Init(nat, nat, str);
  73. }
  74.  
  75. HGlue::HGlue (Painter* bg, int nat, int shr, int str) : (bg) {
  76.     Init(nat, shr, str);
  77. }
  78.  
  79. void HGlue::Init (int nat, int shr, int str) {
  80.     SetClassName("HGlue");
  81.     shape->width = nat;
  82.     shape->height = 0;
  83.     shape->Rigid(shr, str, vfil, vfil);
  84. }
  85.  
  86. VGlue::VGlue (int nat, int str) {
  87.     Init(nat, nat, str);
  88. }
  89.  
  90. VGlue::VGlue (const char* name, int nat, int str) : (name) {
  91.     Init(nat, nat, str);
  92. }
  93.  
  94. VGlue::VGlue (int nat, int shr, int str) {
  95.     Init(nat, shr, str);
  96. }
  97.  
  98. VGlue::VGlue (const char* name, int nat, int shr, int str) : (name) {
  99.     Init(nat, shr, str);
  100. }
  101.  
  102. VGlue::VGlue (Painter* bg, int nat, int str) : (bg) {
  103.     Init(nat, nat, str);
  104. }
  105.  
  106. VGlue::VGlue (Painter* bg, int nat, int shr, int str) : (bg) {
  107.     Init(nat, shr, str);
  108. }
  109.  
  110. void VGlue::Init (int nat, int shr, int str) {
  111.     SetClassName("VGlue");
  112.     shape->width = 0;
  113.     shape->height = nat;
  114.     shape->Rigid(hfil, hfil, shr, str);
  115. }
  116.